<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>构造函数</title>
</head>
<body>
    
    <script>    

        {
            // 构造函数
            function Fn () {
                getName = function () {
                    console.log('qqq');
                }
            }

            Fn.getName = function () {
                console.log('www');
            }

            var getName = function () {
                console.log('eee');
            }

            Fn.getName();
            getName();


        }

    </script>

</body>
</html>